<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Cache-Control" content="no-siteapp">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=1, minimum-scale=1, maximum-scale=1">
<meta name="renderer" content="webkit">
<meta name="google" value="notranslate">
<meta name="robots" content="index,follow">


<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="小熊的窝">
<meta name="twitter:description" content="记录生活中的茶米油盐">
<meta name="twitter:image:src" content="https://gitee.com/toolkit/blog/blog/images/头像.jpg">

<meta property="og:url" content="https://gitee.com/toolkit/blog">
<meta property="og:title" content="小熊的窝">
<meta property="og:description" content="记录生活中的茶米油盐">
<meta property="og:site_name" content="小熊的窝">
<meta property="og:image" content="https://gitee.com/toolkit/blog/blog/images/头像.jpg">
<meta property="og:type" content="website">
<meta name="robots" content="noodp">

<meta itemprop="name" content="小熊的窝">
<meta itemprop="description" content="记录生活中的茶米油盐">
<meta itemprop="image" content="https://gitee.com/toolkit/blog/blog/images/头像.jpg">

<link rel="canonical" href="https://gitee.com/toolkit/blog">

<link rel="shortcut icon" href="/blog/favicon.png">
<link rel="apple-itouch-icon" href="/blog/favicon.png">
<link rel="stylesheet" href="/blog/bundle/index.css">
<script type="text/javascript">
    var timeSinceLang = {
        year: '年前',
        month: '个月前',
        day: '天前',
        hour: '小时前',
        minute: '分钟前',
        second: '秒前'
    };
    var root = '\/blog';
</script>


        <meta name="keywords" content="计算机,">
        <meta name="description" content="纸小墨">
        <meta name="author" content="小熊">
        <title>纸小墨</title>
    </head>
    <body>
        <article class="container">
            <header class="header-wrap">
  <a class="index" href="/blog/">
    <img class="logo" src="/blog/images/%e5%a4%b4%e5%83%8f.jpg" />
    小熊的窝
  </a>
  <ul class="menu">
      <li class="menu-item"><a href="/blog/archive.html">归档</a></li>
      <li class="menu-item"><a href="/blog/tag.html">标签</a></li>
      <li class="menu-item"><a href="/blog/atom.xml">订阅</a></li>
  </ul>
</header>

            <article class="main article">
                <h1 class="title">纸小墨</h1>
                <section class="info">
                    <span class="avatar" style="background-image: url(/blog/images/%e5%a4%b4%e5%83%8f.jpg);"></span>
                    <a class="name" href="/blog/about.me.html">小熊</a>
                    
                    <span class="date" data-time="1468227600"><span class="from"></span></span>
                    
                    <span class="tags"><a class="tag" href="/blog/tag/%e8%ae%a1%e7%ae%97%e6%9c%ba/index.html">计算机</a></span>
                </section>
                <article class="content"><h1>纸小墨（InkPaper）的基本使用</h1>

<p>预览 ink serve</p>

<p>生成 ink build</p>

<pre><code>获取当前时间
@echo off
for /f &quot;delims=&quot; %%a in ('&quot;echo %date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,2%:%time:~3,2%:%time:~6,2%&quot;') do mshta vbscript:clipboardData.SetData(&quot;text&quot;,&quot;%%a&quot;)(window.close)
</code></pre>

<p><a href="http://cs.occamx.com/">朵说</a></p>

<h1>主题</h1>

<p><a href="https://github.com/myiq/ink-simple">simple</a></p>

<p><img src="" data-src="/images/theme/simple.png" alt="" /></p>

<p><a href="https://github.com/akkuman/ink-theme-story">story</a></p>

<p><img src="" data-src="/images/theme/story.png" alt="" /></p>

<p><a href="https://github.com/w568w/InkMaterialTheme">Material</a></p>

<p><img src="" data-src="/images/theme/Material.png" alt="" /></p>

<p><a href="https://github.com/InkProject/ink-theme-dark">dark</a></p>

<p><img src="" data-src="/images/theme/dark.png" alt="" /></p>

<h1>遇到的问题</h1>

<p>Q：使用静态博客程序生成网页显示不全，当要部署的项目与自己的个性地址不一致时，部署完成后存在一些资源访问404？</p>

<p>A： 当需要部署的仓库和自己的个性地址不一致时，如：<a href="https://gitee.com/ipvb/blog">https://gitee.com/ipvb/blog</a> ，生成的pages url 为 <a href="https://ipvb.gitee.io/blog">https://ipvb.gitee.io/blog</a> ，而访问的资源404，如 <a href="https://ipvb.gitee.io/style.css">https://ipvb.gitee.io/style.css</a> 。这是因为相应配置文件的相对路径存在问题导致的，生成的资源 url 应该为 <a href="https://ipvb.gitee.io/blog/style.css">https://ipvb.gitee.io/blog/style.css</a> 才对。对于不同的静态资源生成器，配置如下：</p>

<pre><code>Hugo 配置文件config.toml的baseURL修改如下
baseURL = &quot;https://ipvb.gitee.io/blog&quot;

Hexo 配置文件_config.yml的url和root修改如下：
url: https://ipvb.gitee.io/blog
root: /blog

Jekyll 配置文件_config.yml的 baseurl修改如下：
baseurl: &quot;/blog&quot; # the subpath of your site, e.g. /blog

inkpaper 配置文件config.yml的的url和root修改如下：
url: https://ipvb.gitee.io/blog
root: /blog
</code></pre>

<h1>git上传工具</h1>

<p><a href="https://ifwz.lanzous.com/islXakl60eb">TortoiseGit_x86</a></p>

<p><a href="https://ifwz.lanzous.com/iQ5Eil4mlpi">TortoiseGit-64bit</a></p>

<p><a href="https://ifwz.lanzous.com/i6r0Gkl3e0d">ink_windows_386</a></p>
</article>
                <section class="author">
                    <div class="avatar" style="background-image: url(/blog/images/%e5%a4%b4%e5%83%8f.jpg);"></div>
                    <a class="name" href="/blog/about.me.html">小熊</a>
                    <div class="intro">记录生活中的茶米油盐</div>
                </section>
                <section class="recommend">
                    
                    <section class="nav prev more">
                        <div class="head">上篇文章</div>
                        <a class="link" href="/blog/ink-blog-tool.html">简洁的静态博客构建工具 —— 纸小墨（InkPaper）</a>
                    </section>
                    
                    
                    <section class="nav next more">
                        <div class="head">下篇文章</div>
                        <a class="link" href="/blog/invention.html">某些人改变了我们生活的样貌</a>
                    </section>
                    
                </section>
                
    <section id="disqus_thread"></section>
    <script type="text/javascript">
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//username.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>


            </article>
        </article>
        <footer class="footer">
    <span class="copyright">
        小熊的窝 ©
        <script type="text/javascript">
            document.write(new Date().getFullYear());
        </script>
    </span>
    <span class="publish">Powered by <a href="https://imeoer.github.io/" target="_blank">Ink</a></span>
</footer>

        <script src="/blog/bundle/index.js"></script>
        
        
		<script type="text/javascript" src="http://static.tctip.com/tctip-1.0.0.min.js"></script>
		<script>
		  new tctip({
			top: '20%',
			button: {
			  id: 9,
			  type: 'zanzhu',
			},
			list: [
			  {
				type: 'alipay',
				qrImg: './images/alipay.jpg'
			  }, {
				type: 'wechat',
				qrImg: './images/wechat.jpg'
			  }
			]
		  }).init()
		</script>
    </body>
</html>
